

<%@ page import="givenchy.Task" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'task.label', default: 'Task')}" />
        <title>修改任务</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list">返回列表</g:link></span>
        </div>
        <div class="body">
            <h1>修改任务</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${taskInstance}">
            <div class="errors">
                <g:renderErrors bean="${taskInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post"  name="taskForm">
                <g:hiddenField name="id" value="${taskInstance?.id}" />
                <g:hiddenField name="version" value="${taskInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="name">名称</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: taskInstance, field: 'name', 'errors')}">
                                    <g:textField name="name" value="${taskInstance?.name}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="seek">权重</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: taskInstance, field: 'seek', 'errors')}">
                                    <g:textField name="seek" value="${fieldValue(bean: taskInstance, field: 'seek')}" />
                                </td>
                            </tr> 
                         
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="actions">动作</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: taskInstance, field: 'actions', 'errors')}">
                                    
                                    <table style="border:0">
                                    <tr>
                                        <td><g:textArea cols="80" rows="5"  name="actions" value="${taskInstance?.actions}" /></td>
                                        <td>
<pre>
eg://   name , target ,value
open, http://www.baidu.com
sleep, 5
input, id|kw, 山寨机
sleep, 3
click, id|su
sleep, 3
click, link|www.shanzhaiji.cn
open, www.shanzhaiji.cn
sleep, 3
clickad, googleads.g.doubleclick.net
sleep, 3
quit, quit
</pre>
                                    </td>
                                    </tr>
                                    </table>
                                    
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="修改完成" /></span>
                </div>
            </g:form>
        </div>
        <g:javascript src="validate/jquery.validate.js" type="text/javascript"/>
        <g:javascript src="domain/task_create.js" type="text/javascript"/>
    </body>
</html>
